package com.jims.master.modules.csm.entity; /**
 * jims
 */

import org.hibernate.validator.constraints.Length;
import com.fasterxml.jackson.annotation.JsonBackReference;

import com.jims.master.common.persistence.DataEntity;

/**
 * 消耗品类别字典Entity
 *
 * @author fengyg
 * @version 2017-05-04
 */
public class ExpClassDict extends DataEntity<ExpClassDict> {

    private static final long serialVersionUID = 1L;
    private String classCode;        // 类别代码
    private String className;        // 类别名称
    private ExpClassDict parent;        // 父级ID集合
    private String parentIds;        // 所有父级编号


    public ExpClassDict() {
        super();
    }

    public ExpClassDict(String id) {
        super(id);
    }

    @Length(min = 1, max = 10, message = "类别代码长度必须介于 1 和 10 之间")
    public String getClassCode() {
        return classCode;
    }

    public void setClassCode(String classCode) {
        this.classCode = classCode;
    }

    @Length(min = 1, max = 40, message = "类别名称长度必须介于 1 和 40 之间")
    public String getClassName() {
        return className;
    }

    public void setClassName(String className) {
        this.className = className;
    }

    @JsonBackReference
    public ExpClassDict getParent() {
        return parent;
    }

    public void setParent(ExpClassDict parent) {
        this.parent = parent;
    }

    @Length(min = 0, max = 2000, message = "所有父级编号长度必须介于 0 和 2000 之间")
    public String getParentIds() {
        return parentIds;
    }

    public void setParentIds(String parentIds) {
        this.parentIds = parentIds;
    }


}